Let X be a locally connected locally compact metric space and f: X → X a continuous map. Let A be a compact transitive set under f. If A is asymptotically stable, then it has finitely many connected components, which are cyclically permuted. If it is Liapunov stable, then A may have infinitely many connected components. Our main result states that these form a Cantor set on which f is topologically conjugate to an adding machine. A number of consequences are derived, including a complete classification of compact transitive sets for continuous maps of the interval and the Liapunov instability of the invariant Cantor set of Denjoy maps of the circle.